/**
 * Created with JetBrains WebStorm.
 * User: zhoums
 * Date: 14-1-8
 * Time: 下午1:57
 * To change this template use File | Settings | File Templates.
 */
/*indexPage showTap img*/
$(function(){
  $(".hostNav").delegate("li","click",function(){
      var _thisName="index_"+$(this).attr("data-id");
      $(this).addClass("active").siblings().removeClass("active");
      $("."+_thisName,".host_main").show().siblings().hide();
  })
    /*设置相册位置*/
    setPhotosPosition();
})
function setPhotosPosition(){
    $("#news_photo li:gt(2)").find("a").each(function(){
        var symbol=plusOrMinus(),number=Math.round(Math.random()*(50-0)+0);
        $(this).css({"margin-top":"-180px","margin-left":(symbol+number+"px")});
    })
}
function plusOrMinus(){
    return Math.round(Math.random()*(2-1)+1)===1?"-":"";
}